package com.game.springbootstart.controller.user;

import com.game.springbootstart.config.Result;
import com.game.springbootstart.entity.Notices;
import com.game.springbootstart.service.ICategoryService;
import com.game.springbootstart.service.INoticesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/notice")
public class NoticeController {
    @Autowired
    private INoticesService noticesService;

    @GetMapping("/viewNotices")
    public Result viewNotices() {
        List<Notices> notices = noticesService.listBy();
        return Result.success(notices);
    }
}
